<template>
	<view>
<!--		<uni-fab-->
<!--		    :content="content"-->
<!--		    horizontal="right"-->
<!--		    @trigger="handleClick"-->
<!--		/>-->
		<view class="swiper-box">
			<scroll-view class="backg">
        <uni-row>
          <uni-col :xs="24" :sm="11" class="info-box" v-for="report in reports" @click="handleLook(report.id)">
            <view>
              <uni-title :title="parseTime(report.createTime,'{y}-{m}-{d}')" type="h1"
                         style="padding-left:20px;margin-bottom: 10px;"/>
            </view>
            <uni-row style="padding-left:20px;">
              <uni-col :span="20">
                <uni-row>
                  <uni-col :span="14" class="text" >
                    <text >侵染换料量:&nbsp;&nbsp;{{report.qrChange / 10000}}</text>
                  </uni-col>
                </uni-row>
                <uni-row>
                  <uni-col :span="14" class="text">
                    <text space="emsp">育种换料量:&nbsp;&nbsp;{{report.yzChange /10000}}</text>
                  </uni-col>
                  <uni-col :span="10" class="text">
                    <text space="emsp"> 蛹数量:&nbsp;&nbsp;{{report.pupaNum /10000}}</text>
                  </uni-col>
                </uni-row>
                <uni-row>
                  <uni-col :span="14" class="text"><text space="emsp"> 僵虫数量:&nbsp;&nbsp;{{report.stiffNum /10000}}</text></uni-col>
                  <uni-col :span="10" class="text">
                    <text >死亡数量:&nbsp;&nbsp;{{report.deathNum /10000}}</text>
                  </uni-col>
                </uni-row>
              </uni-col>
              <uni-col :span="3" style="text-align: center;margin-top:10px ;">
                <uni-icons type="forward" size="30"></uni-icons>
              </uni-col>
            </uni-row>
          </uni-col>
        </uni-row>
			</scroll-view>
		</view>
	</view>
</template>

<script setup lang="ts">

  import {ReportDataHandle} from "../../pagesVM/report";
  import {parseTime} from "../../util/auth";
  import UniCol from "../../uni_modules/uni-row/components/uni-col/uni-col.vue";
  import UniRow from "../../uni_modules/uni-row/components/uni-row/uni-row.vue";


  const {handleClick,reports,content} = ReportDataHandle()

  const handleLook = (id:number) => {
    uni.navigateTo({
      url:'/pages/report/form?id='+ id
    })
  }

</script>

<style lang="scss">
	.swiper-box {
		height: 100%;
	}

	.info-box {
		margin: 10px;
		border-radius: 5px;
		padding: 20px;
		background-color: white;
	}

	.status {
		text-align: right;
		line-height: 40px;
	}

	.backg {
		background-color: rgba(240, 240, 240, 0.76);
		height: 100%;
	}

	.text {
		font-size: 20px;
		color: #7f7f7f;
	}
</style>
